home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ABUSESRC.ZIP / AbuseSrc / imlib / include / status.hpp < prev    next >
C/C++ Source or Header  |  1996-04-11  |  922b  |  43 lines

  1. #ifndef __STATUS_HPP_
  2. #define __STATUS_HPP_
  3.  
  4. #include "visobj.hpp"      // get visual object declaration
  5.  
  6.  
  7. class status_manager
  8. {
  9.   public :
  10.   virtual void push(char *name, visual_object *show) = 0;
  11.   virtual void update(int percentage) = 0;
  12.   virtual void pop() = 0;
  13.   virtual void force_display() { ; }
  14. } ;
  15.  
  16.  
  17. class text_status_node;
  18.  
  19. class text_status_manager : public status_manager
  20. {
  21.   public :
  22.   int level;
  23.   text_status_node *first;
  24.   text_status_manager();
  25.   virtual void push(char *name, visual_object *show);
  26.   virtual void update(int percentage);
  27.   virtual void pop();
  28. } ;
  29.  
  30.  
  31. extern status_manager *stat_man;
  32.  
  33. class stack_stat  // something you can declare on the stact that is sure to get cleaned up
  34. {
  35.   public :
  36.   stack_stat(char *st, visual_object *show=NULL) { if (stat_man) stat_man->push(st,show); }
  37.   ~stack_stat() { if (stat_man) stat_man->pop(); }
  38. } ;
  39.  
  40.  
  41. #endif
  42.  
  43.